# $Id: PKGBUILD 83283 2013-01-28 17:56:05Z ttoepper $
# Maintainer: Thorsten Töpper <atsutane-tu@freethoughts.de>

pkgname=i3lock
pkgver=2.4.1
pkgrel=2
pkgdesc="An improved screenlocker based upon XCB and PAM"
arch=('i686' 'x86_64')
url="http://i3wm.org/i3lock/"
license=('MIT')
groups=("i3")
depends=('xcb-util-image' 'xcb-util-keysyms' 'pam' 'libev' 'cairo')
options=('docs')
backup=("etc/pam.d/i3lock")
source=("http://i3wm.org/i3lock/$pkgname-$pkgver.tar.bz2")
md5sums=('fbc954133a6335be89e394d9ec85fcfd')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  
  # Fix ticket FS#31544, sed line taken from gentoo
  sed -i -e 's:login:system-auth:' i3lock.pam

  make
  gzip i3lock.1
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  
  install -Dm644 i3lock.1.gz ${pkgdir}/usr/share/man/man1/i3lock.1.gz
  install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
  make clean
}

# vim:set ts=2 sw=2 et:

